// vite.config.ts
import { defineConfig, loadEnv } from "file:///F:/Project/nyjm/NYJM/node_modules/vite/dist/node/index.js";
import vue from "file:///F:/Project/nyjm/NYJM/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import * as path from "path";
import AutoImport from "file:///F:/Project/nyjm/NYJM/node_modules/unplugin-auto-import/dist/vite.js";
import Components from "file:///F:/Project/nyjm/NYJM/node_modules/unplugin-vue-components/dist/vite.mjs";
import { ElementPlusResolver } from "file:///F:/Project/nyjm/NYJM/node_modules/unplugin-vue-components/dist/resolvers.mjs";
import { viteMockServe } from "file:///F:/Project/nyjm/NYJM/node_modules/vite-plugin-mock/dist/index.js";
import { createSvgIconsPlugin } from "file:///F:/Project/nyjm/NYJM/node_modules/vite-plugin-svg-icons/dist/index.mjs";
var __vite_injected_original_dirname = "F:\\Project\\nyjm\\NYJM";
var vite_config_default = defineConfig(({ command, mode }) => {
  return {
    define: {
      "process.env": process.env,
      // solve the process not define problem
      "process.platform": null,
      "process.version": null
    },
    resolve: {
      // 设置别名
      alias: {
        "@": path.resolve(__vite_injected_original_dirname, "src")
      }
    },
    plugins: [
      vue(),
      // 自动引入饿了吗css
      AutoImport({
        resolvers: [ElementPlusResolver()]
      }),
      Components({
        resolvers: [ElementPlusResolver()]
      }),
      // mocks
      viteMockServe({
        ignore: /^\_/,
        mockPath: "./src/mock",
        // mock文件地址
        localEnabled: loadEnv(mode, process.cwd()).VITE_MOCK === "true",
        // 开发打包开关
        prodEnabled: command !== "serve",
        // 生产打包开关
        supportTs: true,
        // 打开后，可以读取 ts 文件模块。 请注意，打开后将无法监视.js 文件
        injectCode: `
                import { setupProdMockServer } from './mockServer';
                setupProdMockServer();
              `
      }),
      // svg
      createSvgIconsPlugin({
        // 指定需要缓存的图标文件夹
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        // 指定symbolId格式
        symbolId: "icon-[dir]-[name]"
        /**
         * 自定义插入位置
         * @default: body-last
         */
        // inject?: 'body-last' | 'body-first'
        /**
         * custom dom id
         * @default: __svg__icons__dom__
         */
        // customDomId: '__svg__icons__dom__',
      })
    ],
    server: {
      port: 5064,
      // 启动端口
      hmr: {
        host: "127.0.0.1",
        port: 5064
      },
      // 设置 https 代理
      proxy: {
        // '/api': {
        //   target: 'xxx.xxx.xxx.xxx',
        //   changeOrigin: true,
        //   rewrite: (path: string) => { return path.replace(/^\/api/, '') }
        // }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJGOlxcXFxQcm9qZWN0XFxcXG55am1cXFxcTllKTVwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiRjpcXFxcUHJvamVjdFxcXFxueWptXFxcXE5ZSk1cXFxcdml0ZS5jb25maWcudHNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL0Y6L1Byb2plY3QvbnlqbS9OWUpNL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgZGVmaW5lQ29uZmlnLCBsb2FkRW52IH0gZnJvbSAndml0ZSc7XHJcbmltcG9ydCB2dWUgZnJvbSAnQHZpdGVqcy9wbHVnaW4tdnVlJztcclxuaW1wb3J0ICogYXMgcGF0aCBmcm9tICdwYXRoJztcclxuaW1wb3J0IEF1dG9JbXBvcnQgZnJvbSAndW5wbHVnaW4tYXV0by1pbXBvcnQvdml0ZSdcclxuaW1wb3J0IENvbXBvbmVudHMgZnJvbSAndW5wbHVnaW4tdnVlLWNvbXBvbmVudHMvdml0ZSdcclxuaW1wb3J0IHsgRWxlbWVudFBsdXNSZXNvbHZlciB9IGZyb20gJ3VucGx1Z2luL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